<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <div v-on:click="doParent">
        <button v-on:click="doThis">事件冒泡</button>
        <button v-on:click.stop-"doThis">阻止事件冒泡</button>
        </div>
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            methods:{
                dpParent(){
                    console.log('我是父元素单击事件')
                },
                doThis(){
                    console.log('我是被单击元素事件')
                }
            }
        })
    </script>
</body>
</html>